/**
 * related to topbar.ui
 * 
 * @Author : wzgl5533
 * @Timestamp : 2017-07-18
 */
//引入组件
var do_App = sm("do_App");
var do_Page = sm("do_Page");
var dojs = require("dojs");
// 实例化组件
var do_ALayout_topbar = ui("do_ALayout_topbar");
var backLy = ui("do_ALayout_back");
var backIcon = ui("do_ImageView_back_icon");
var title = ui("do_Label_title");
dojs.style.css(do_ALayout_topbar, "pageTopbar")
//订阅消息，初始化内容
do_Page.on("initTopBarMsg",function(data){
	title.text = data.text;
	backLy.visible = data.isBack;
});




//返回监听
backLy.on("touch",function(){

});
backLy.on("touchDown",function(){
	backIcon.source = "source://image/back_press.png";
});
backLy.on("touchUp",function(){
	backIcon.source = "source://image/back_unpress.png";
	do_App.closePage();
});
